<include file="Public:head" />
<style>
    tr td{
        text-align: center;
    }
    .dannum{
        width: 300px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        display: inline-block;
    }
</style>
<body class="overflow-hidden">
<div class="wrapper preload">
    <include file="Public:header" />
    <include file="Public:left" />

    <div class="main-container">
        <div class="padding-md">
            <div class="row">
                <div class="col-sm-12">
                    <div class="page-title">
                        用户行为
                    </div>
                </div>
            </div>
            <div class="col-sm-12 row chach">
                <!--<button class="action-button" type="button" onclick="window.open('{:U("User/addAction")}','_self')">新增</button>-->
                <!--<button class="action-button" onclick='window.open("{:U('User/setStatus',array('Model'=>'Action','status'=>'1'))}","_self")' >启用</button>-->
                <!--<button class="action-button" onclick='window.open("{:U('User/setStatus',array('Model'=>'Action','status'=>'0'))}","_self")'>禁用</button>-->
                <!--<button class="action-button" onclick='window.open("{:U('User/setStatus',array('Model'=>'Action','status'=>'-1'))}","_self")'>删除</button>-->
            </div>
            <div class="row">
                <div class="col-lg-12">
                    <div class="smart-widget widget-green">
                        <div class="smart-widget-header row ">
                            <span class="smart-widget-option">
                                <span class="refresh-icon-animated">
                                    <i class="fa fa-spinner fa-spin" style="color:#fff"></i>
                                </span>
                                <a href="#" class="widget-toggle-hidden-option">
                                </a>
                                <a href="#" class="widget-collapse-option" data-toggle="collapse">
                                </a>
                                <a href="#" class="widget-refresh-option">
                                </a>
                            </span>
                        </div>
                        <div class="smart-widget-inner table-responsive">
                            <div class="smart-widget-hidden-section">
                                <ul class="widget-color-list clearfix">
                                    <li style="background-color:#20232b;" data-color="widget-dark"></li>
                                    <li style="background-color:#4c5f70;" data-color="widget-dark-blue"></li>
                                    <li style="background-color:#23b7e5;" data-color="widget-blue"></li>
                                    <li style="background-color:#1fb5ac;" data-color="widget-green"></li>
                                    <li style="background-color:#edbc6c;" data-color="widget-yellow"></li>
                                    <li style="background-color:#fbc852;" data-color="widget-orange"></li>
                                    <li style="background-color:#e36159;" data-color="widget-red"></li>
                                    <li style="background-color:#7266ba;" data-color="widget-purple"></li>
                                    <li style="background-color:#f5f5f5;" data-color="widget-light-grey"></li>
                                    <li style="background-color:#fff;" data-color="reset"></li>
                                </ul>
                            </div>
                            <table class="table table-striped no-margin">
                                <thead>
                                <tr>
                                    <!--<th class="text-center" style="width: 80px"><input type="checkbox" class="check-all"></th>-->
                                    <th class="text-center" style="width: 80px">序号</th>
                                    <th class="text-center" style="width: 200px">标识</th>
                                    <th class="text-center" style="width: 200px">名称</th>
                                    <th class="text-center" style="width: 200px">类型</th>
                                    <th class="text-center " >规则</th>
                                    <th class="text-center" style="width: 200px">状态</th>
                                    <th class="text-center" style="width: 300px">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <notempty name="_list">
                                    <volist name="_list" id="vo" key="key">
                                        <tr>
                                            <!--<td><input class="ids" type="checkbox" name="ids[]" value="{$vo.id}" /></td>-->
                                            <td>{$key+$num} </td>
                                            <td>{$vo.name}</td>
                                            <td><a href="{:U('editAction?id='.$vo['id'])}">{$vo.title}</a></td>
                                            <td><span>{:get_action_type($vo['type'])}</span></td>
                                            <td>
                                                <span class="dannum">{$vo.remark}</span></td>
                                            <td>{$vo.status_text}</td>
                                            <td><a href="{:U('User/editAction?id='.$vo['id'])}">编辑</a>
                                                <a href="{:U('User/setStatus?Model=action&ids='.$vo['id'].'&status='.abs(1-$vo['status']))}" class="ajax-get confirm">{$vo.status|show_status_op}</a>
                                                <a href="{:U('User/setStatus?Model=action&status=-1&ids='.$vo['id'])}" class="confirm ajax-get">删除</a>
                                            </td>
                                        </tr>
                                    </volist>
                                    <else/>
                                    <tr>
                                        <td colspan="8">对不起！暂时还没有数据！</td>
                                    </tr>
                                </notempty>
                                </tbody>
                            </table>
                            <div class="choose-page row">
                                {$_page}
                            </div>
                        </div><!-- ./smart-widget-inner -->
                    </div><!-- ./smart-widget -->
                </div><!-- ./col -->
            </div><!-- ./row -->
        </div><!-- ./padding-md -->
    </div><!-- /main-container -->
    <include file="Public:foot" />
</div><!-- /wrapper -->
<a href="#" class="scroll-to-top hidden-print"><i class="fa fa-chevron-up fa-lg"></i></a>
</body>
</html>
<block name="script">
    <script>

        $(function(){
            $("#action_add").click(function(){
                window.location.href = $(this).attr('url');
            })
            highlight_nav2('{:U("User/userAction")}');

        })

    </script>
</block>
